using ChikovMF.Application.Features.Projects.GetListProject;
using Shouldly;

namespace ChikovMF.Tests.Projects.Queries;

public class ListProjectTest : TestQueryBase
{
    [Fact]
    public async Task ListProjectTest_Success()
    {
        var handler = new ListProjectQueryHandler(_context, _mapper);
        var command = new ListProjectQuery();

        var result = await handler.Handle(
            command,
            CancellationToken.None
        );

        result.ShouldBeOfType<ListProjectModel>();
        result.Projects!.Count.ShouldBe(2);
    }
}